#include "fx_reverse.h"
#include "ui_fx_reverse.h"
fx_reverse::fx_reverse(QWidget *parent) :
    fx_basic(parent),
    ui(new Ui::fx_reverse)
{
    ui->setupUi(this);
    ui->label_gain->setText(QString::number(0) + " dB");
    ui->label_mix->setText(QString::number(0) + " dB");
    ui->label_high->setText(QString::number(0.001) + " ms");
    ui->label_time->setText(QString::number(0.001) + " ms");
}


fx_reverse::~fx_reverse()
{
    delete ui;
}

void fx_reverse::gain(int value)
{
    ui->label_gain->setText(QString::number(value) + " dB");
}

void fx_reverse::mix(int value)
{
    ui->label_mix->setText(QString::number(value) + " dB");
}

void fx_reverse::time(int value)
{
 ui->label_time->setText(QString::number(double(value) / 1000) + " ms");
}

void fx_reverse::high(int value)
{
    ui->label_high->setText(QString::number(double(value) / 1000) + " ms");
}

void fx_reverse::addFX()
{
    BASS_DX8_REVERB* result = new BASS_DX8_REVERB();
    result->fInGain = ui->slid_gain->value();//0.0;
    result->fReverbMix = ui->slid_mix->value();//0;
    result->fReverbTime = double(ui->slid_time->value()) / 1000;//1000.0;
    result->fHighFreqRTRatio = double(ui->slide_high->value()) / 1000;//0.1;
    emit apply(BASS_FX_DX8_REVERB, result);
}
